home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / network / usrpr103.zip / USERPREF.DOC < prev    next >
Text File  |  1992-06-29  |  6KB  |  105 lines

  1.  
  2. UserPref 1.03
  3. 6/28/92 Matthew Mills
  4. Bugs, Comments, Suggestions -> millsm@csus.edu
  5.  
  6. DESCRIPTION:
  7.   Imagine yourself in charge of several computer labs full of IBM PCs and each
  8. machines has several different configurations which you must maintain and
  9. update.  Sound scary? It is, and that is my job.  I work for the computer center
  10. at my university which has several student labs.  I wrote this program to help
  11. me identify the station numbers on our printer banners with our network (We
  12. were using Banyan at that time) but after using it a semester I found many other
  13. uses for it such as setting our stations IP addresses (No BOOTP server was
  14. available) or specifying hardware availability to picky programs.  If you do the
  15. same type of work this program should be a helpful and powerful tool.  I would
  16. be interested in knowing how you use it in your sites, please drop me a letter
  17. at millsm@csus.edu
  18.  
  19. WHAT IT DOES:
  20.   UserPref looks for a network card in the machine and finds the HARDWARE
  21. ADDRESS of the card.  Every card has a unique hardware address set by the
  22. manufacturer.  Userpref then parses a data file looking for the hardware
  23. address in the file. Once it finds it UserPref changes sets environment
  24. variables, executes dos commands, and displays short messages.
  25.   The typical installation would be to have UserPref and its data file on a
  26. file server.  The stations connect to the file server and execute UserPref
  27. as part of their login script.  The data file is on the file server to allow
  28. you to change the configurations from wherever you are working.
  29.  
  30. SETTING IT UP:
  31.   1) Put the USERPREF.EXE on the network in a utilities directory which every
  32. station can execute from. I have this directory as part of the path in our
  33. labs but it is not necessary.
  34.  
  35.   2) The next step is to collect the hardware addresses of the stations.  If
  36. you recorded all the HW Addresses when you installed the cards, Good for you!
  37. But if your like me you didn't type "Userpref /i" at the dos prompt and
  38. UserPref will look for the network card and display the hardware address if it
  39. can find it.  If UserPref cannot find the card (and you know there is one
  40. installed) check out the TECHNICAL section for current limitations.
  41.  
  42.   3) Use your favorite text editor to create the data file.  You should look at
  43. the SAMPLE.DAT file included to see all the details of the data file.  For each
  44. station you enter the hardware address on a line as shown below-
  45.         :00:0C:0D:17:45:88:   ; This is station 1
  46. The text after the semicolon is a remark and will not be parsed. When entering
  47. HEX values you must use the upper case character (ei: A0 instead of a0).
  48. On the lines that follow you enter the commands to configure that station.
  49. Below are the different commands you may use-
  50.         SET VAR=VALUE  - This sets the environment variable "VAR" to the value
  51.                          "VALUE". The variable must be in upper case but the
  52.                          value can be any case. Having an empty value will
  53.                          remove the variable from the environment.
  54.         DOS command    - This will execute a dos command.  You can put any
  55.                          parameters on the command as well.
  56.         ECHO message   - This displays a message on the screen.
  57.         WIPE           - This command erases all environment variables.
  58.  
  59.   4) Test out your data file by connecting to the server and running the
  60. UserPref program on the station you entered.  You can use the /v switch to
  61. get a display of the commands executed by UserPref.  If everything looks fine
  62. then add the UserPref program to the login script.
  63.  
  64. DATA FILE DETAILS:
  65.   The data file is an ordinary ascii text file which holds the individual
  66. configurations of the stations in the lab.  When UserPref runs it opens the
  67. file with read access only so the data file can and should be placed in a
  68. protected directory.
  69.   The parsing rules are fairly simple-
  70.    Begin comments with a ";". Any text after a semi-colon is ignored.
  71.    If the first character on a line is a colon (:) then the line contains either
  72.        A hardware address - Compared with your cards HW address.
  73.        :GLOBALS - Settings for every station. Globals should be at the top but
  74.                   they can be placed anywhere.
  75.        :DEFAULT - Settings to use if the card isn't found in the list yet.
  76.                   Default settings should always be at the bottom but can be
  77.                   placed anywhere (though the address may be later in the file)
  78.   Any amount of commands can be listed after an address. Another address
  79.     will signal the end of the commands.
  80.   Any word surrounded by percents will be replaced by the environment variables
  81.     value. (ei: if DOM=130.86.90  then %DOM%.20 will become 130.86.90.20 )
  82.     Two percent signs in a row will become a single percent sign (ei:  %%=%)
  83.   The parsing ends at the end of the file.
  84.  
  85.  
  86. TECHNICAL:
  87.   Looking for the HARDWARE ADDRESS -  Userpref attempts to find the address by
  88.    checking for the existance of Netware, and asking IPX:SPX for the address.
  89.    If Netware is not available it scans the IO ports for a Western Digital card.
  90.    If no Western Digital card is found Userpref gives up.
  91.    Source for looking up 3-Com cards is included but not compiled since it
  92.    requires writing to IO ports which can be fairly risky.
  93.    If you have a particular card you want to add you can attempt it on your own
  94.    by looking through the packet driver source for that card.  Look at the
  95.    WDADDR.C as an example.  And if you need any help you can email me.
  96.   ENVIRONMENTAL ISSUES - When a program start executing it gets a copy of its
  97.    parents environment table.  Any changes to the programs environment table
  98.    will be lost when the program quits.  UserPref makes changes to the parents
  99.    environment table by tracing up the PSP block. It does not go to the top
  100.    of the PSP chain, just the immediate parent. In short, you must run userpref
  101.    from the root command.com and not a child.  UserPref does not check for
  102.    environment space limitations so be sure you have enough space set in
  103.    your config.sys (check your DOS manual for setting this).
  104.  
  105.